package com.hzqy.persistence.dao.appointment;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.PmsUserVo;
import com.hzqy.web.vo.wchat.UserAppointmentVo;

@Repository
public class UserAppointmentDao extends PersistenceDao<PmsUserVo, Integer> {
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	private final String namespace = this.getNamespace();
	
	public int insertProgramAppointMent(UserAppointmentVo userAppointmentVo){
		return getSqlSession().insert(this.getNamespace() + "insertProgramAppointMent", userAppointmentVo);
	}
	
	public int deleteProgramAppointMent(int f_uappointment_id){
		return getSqlSession().delete(this.getNamespace() + "deleteProgramAppointMent", f_uappointment_id);
	}
	
	public int updateProgramAppointMent(UserAppointmentVo userAppointmentVo){
		return getSqlSession().update(this.getNamespace() + "updateProgramAppointMent", userAppointmentVo);
	}
	
	public List<UserAppointmentVo> selectProgramAppointMentList(int f_uappointment_userid){
		return getSqlSession().selectList(this.getNamespace() + "selectProgramAppointMentList", f_uappointment_userid);
	}
	
	public UserAppointmentVo selectProgramAppointMent(int f_uappointment_id){
		return getSqlSession().selectOne(this.getNamespace() + "selectProgramAppointMent", f_uappointment_id);
	}
	public List<UserAppointmentVo> selectAllUserAppointmentList() {
		return getSqlSession().selectList(this.getNamespace()+"selectAllUserAppointmentList");
	}
	public int updateAppointMentStatus(UserAppointmentVo userAppointmentVo){
		return getSqlSession().update(this.getNamespace() + "updateAppointMentStatus", userAppointmentVo);
	}
}
